﻿<%@ Page Title="" Language="C#" MasterPageFile="~/doanh_nghiep/DNAdminLayout.master"
    AutoEventWireup="true" CodeFile="phieu_giam_gia.aspx.cs" Inherits="doanh_nghiep_phieu_giam_gia" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="block" id="block-tables">
        <div class="content">
            <h2 class="title">
                Phiếu Giảm Giá</h2>
            <div class="inner">
                <div class="group">
                    <label>
                        Từ khóa:</label>
                    <input type="text" class="text_field" size="60" />
                    &nbsp;
                    <label>
                        Tìm theo:
                    </label>
                    <select>
                        <option>Tên doanh nghiệp</option>
                        <option>Tên sản phẩm</option>
                        <option>Mã phiếu</option>
                    </select>
                    &nbsp;
                    <button class="button slim-button" type="submit">
                        <img src="./images/search.png" alt="Tìm kiếm">
                        Tìm kiếm</button>
                </div>
                <br />
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" CssClass="table" DataKeyNames="id" DataSourceID="SqlDataSourcePhieuGiamGia"
                    Style="margin-right: 31px" CellPadding="4" PageSize="5" AlternatingRowStyle-CssClass="odd"
                    RowStyle-CssClass="even">
                    <AlternatingRowStyle CssClass="odd"></AlternatingRowStyle>
                    <Columns>
                        <asp:BoundField DataField="ma_coupon" HeaderText="Mã coupon" SortExpression="ma_coupon" />
                        <asp:BoundField DataField="ngay_phat_hanh" HeaderText="Ngày phát hành" SortExpression="ngay_phat_hanh" />
                        <asp:BoundField DataField="id_mua_hang" HeaderText="ID mua hàng" SortExpression="id_mua_hang" />
                        <asp:BoundField DataField="ngay_bat_dau" HeaderText="Ngày bắt đầu" SortExpression="ngay_bat_dau" />
                        <asp:BoundField DataField="ngay_ket_thuc" HeaderText="Ngày kết thúc" SortExpression="ngay_ket_thuc" />
                        <asp:BoundField DataField="ten_sp" HeaderText="Tên sản phẩm" SortExpression="ten_sp" />
                        <asp:BoundField DataField="gia_goc" HeaderText="Giá gốc" SortExpression="gia_goc" />
                        <asp:BoundField DataField="gia_km" HeaderText="Giá khuyến mãi" SortExpression="gia_km" />
                    </Columns>
                    <RowStyle CssClass="even"></RowStyle>
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSourcePhieuGiamGia" runat="server" ConnectionString="<%$ ConnectionStrings:babydealConnectionString %>"
                    SelectCommand="SELECT coupon.id, coupon.ngay_phat_hanh, coupon.id_mua_hang, coupon.ma_coupon, khuyen_mai.ngay_bat_dau, khuyen_mai.ngay_ket_thuc, khuyen_mai.ten_sp, khuyen_mai.gia_goc, khuyen_mai.gia_km FROM coupon INNER JOIN mua_hang ON coupon.id_mua_hang = mua_hang.id INNER JOIN khuyen_mai ON mua_hang.id_khuyen_mai = khuyen_mai.id">
                </asp:SqlDataSource>
            </div>
        </div>
    </div>
</asp:Content>
